<div id="home">

    {{# scrum_activated }}

        {{# user_can_see_kanban }}
            <div class="row-fluid">
                <div class="span8 scrum-block">
        {{/ user_can_see_kanban }}

        {{^ scrum_is_configured }}
            {{> empty-scrum }}
        {{/ scrum_is_configured }}

        {{# scrum_is_configured }}
            <div class="ad-homepage-title" data-test="scrum_title">
                <h2>{{ scrum_title }}</h2>
                {{^ is_mono_milestone_enabled }}
                    <a href="?action=show-top&group_id={{ group_id }}&pane=topplanning-v2" class="btn go-to-backlog">
                        <i class="fa fa-inbox"></i> {{ project_backlog }}
                    </a>
                {{/ is_mono_milestone_enabled }}
            </div>
            {{^ is_mono_milestone_enabled }}
                <div class="date-bar">
                    <a href="?group_id={{ group_id }}&period=past" class="{{ past_active }}">{{ past }}</a><!--
                    --><a href="?group_id={{ group_id }}&period=" class="{{ now_active }}">{{ now }}</a><!--
                    --><a href="?group_id={{ group_id }}&period=future" class="{{ future_active }}">{{ future }}</a>
                </div>

                <div id="home-section-user-info">
                    <p>{{ user_helper }}</p>
                </div>
            {{/ is_mono_milestone_enabled }}

            {{# is_mono_milestone_enabled }}
            <div class="row-fluid">
                <div class="plannings span4">
                <div class="last-planning">
                    <div class="planning scrum-monomilestone-block">
                        <div class="scrum-home-ad">
                            <div class="milestone">
                                <div class="header">
                                    <p class="title">{{ top_backlog_planning }}</p>
                                </div>
                                <div class="content">
                                </div>
                                <div class="footer">
                                    <a href="?action=show-top&group_id={{ group_id }}&pane=topplanning-v2#/planning"><i
                                            class="fa fa-list-ul"></i> {{ content }} </a>
                                </div>
                            </div>
                        </div>
                        <div style="clear: both;"></div>
                    </div>
                </div>
            {{/ is_mono_milestone_enabled }}

            {{^ is_mono_milestone_enabled }}
                <div class="row-fluid">
                    {{# has_milestone_presenters }}
                        <div class="plannings span4">
                            {{# milestone_presenters }}
                                <div class="planning">
                                    <h3>{{ milestone_type }}</h3>
                                    <table class="table">
                                        {{# milestones }}
                                        <tr>
                                            <td class="name">{{ getArtifactTitle }} <a href="{{ edit_base_link }}{{ getArtifactId }}" class="backlog-item-link" data-artifact-id="{{ getArtifactId }}"><i class="fa fa-pencil-square-o"></i></a></td>
                                            <td class="actions">
                                                <a href="?group_id={{ group_id }}&planning_id={{ getPlanningId }}&action=show&aid={{ getArtifactId }}&pane=planning-v2"><i class="fa fa-sign-in"></i> {{ planning }}</a>
                                            </td>
                                        </tr>
                                        {{/ milestones }}
                                        {{^ milestones }}
                                            <span class="no-milestone">{{ no_milestone }}</span>
                                        {{/ milestones }}
                                    </table>
                                </div>
                            {{/ milestone_presenters }}
                        </div>
                        <div class="last-plannings span8">
                    {{/ has_milestone_presenters }}

                    {{^ has_milestone_presenters }}
                            <div class="last-plannings last-plannings-only">
                    {{/ has_milestone_presenters }}

                    {{# last_level_milestone_presenters }}
                                <div class="last-planning">
                                    <h3>{{ milestone_type_name }}</h3>
                                        {{# milestone_summary_presenters }}
                                            <div class="milestone">
                                                <div class="header">
                                                    <p class="title">{{ milestone_title }} <a href="{{ edit_base_link }}{{ artifact_id }}" class="backlog-item-link" data-artifact-id="{{ artifact_id }}"><i class="fa fa-pencil-square-o"></i></a></p>
                                                    <p class="hierarchy">
                                                    <i class="fa fa-angle-right"></i>
                                                    {{# breadcrumbs }}
                                                        {{# . }}
                                                        {{# title }}
                                                            <a href="{{ url }}">{{{ title }}}</a> <i class="fa fa-angle-right"></i>
                                                        {{/ title }}
                                                        {{^ title }}
                                                            <a href="{{ url }}">{{{ default_name }}}</a> <i class="fa fa-angle-right"></i>
                                                        {{/ title }}
                                                        {{/ . }}
                                                    {{/ breadcrumbs }}
                                                    <p>
                                                </div>
                                                <div class="content">
                                                    {{# has_burndown }}
                                                        <script type="application/json" class="data-burndown-json" data-for="burndown-placeholder-{{ artifact_id }}">
                                                            {{{ burndown_data }}}
                                                        </script>
                                                        <div id="burndown-placeholder-{{ artifact_id }}" class="milestone-burndown">
                                                        </div>
                                                    {{/ has_burndown }}
                                                    {{^ has_burndown }}
                                                        <div class="open"><span class="number">{{ count_open_backlog_items }}</span>{{ open }}</div>
                                                        <div class="closed"><span class="number">{{ count_closed_backlog_items }}</span>{{ closed }}</div>
                                                    {{/ has_burndown }}
                                                </div>
                                                <div class="footer">
                                                    <a href="?group_id={{ group_id }}&planning_id={{ planning_id }}&action=show&aid={{ artifact_id }}&pane=details"><i class="fa fa-bar-chart-o"></i> {{ content }}</a>
                                                    {{# has_cardwall }}
                                                        <a href="?group_id={{ group_id }}&planning_id={{ planning_id }}&action=show&aid={{ artifact_id }}&pane=cardwall"><i class="fa fa-th-large"></i> {{ cardwall }}</a>
                                                    {{/ has_cardwall }}
                                                </div>
                                            </div>
                                        {{/ milestone_summary_presenters }}
                                        {{^ milestone_summary_presenters }}
                                            <span class="no-milestone">{{ no_milestone }}</span>
                                        {{/ milestone_summary_presenters }}
                                    <div style="clear: both;"></div>
                                </div>
                    {{/ last_level_milestone_presenters }}
                {{/ is_mono_milestone_enabled }}
                    </div>
                </div>
            {{/ scrum_is_configured }}
        </div>
    {{/ scrum_activated }}

    {{# user_can_see_kanban }}
        {{> home-kanban }}

        </div>
    {{/ user_can_see_kanban }}

    {{^ user_can_see_kanban }}
        {{^ scrum_activated }}
            {{> empty-home }}
        {{/ scrum_activated }}
    {{/ user_can_see_kanban }}
</div>
